# vi: syntax=python:et:ts=4
Import("editor_env")
Import("lib_silvertree")

if editor_env["HaveQt"]:
    editor_env.Append(CPPPATH = ".")
    editor_sources = Glob("*.cpp", source = True, strings = True)
    editor_sources.remove("oldmain.cpp")
    editor_uis = Glob("*.ui", source = True)
    editor_mocables = Split("""
        dialogeditordialog.hpp
        editorglwidget.hpp
        editormainwindow.hpp
        terrainhandler.hpp
        editpartydialog.hpp
        editwmldialog.hpp
        derivemapdialog.hpp
    """)
    editor_env.Uic4(editor_uis)
    editor_env.Moc4(editor_mocables)
    editor = editor_env.Program("silvertreeedit", editor_sources + [lib_silvertree])
else:
    print "Couldn't find Qt. Editor cannot be built."
    editor = None

Return("editor")
